home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
001-025
/
scopedisk2
/
vt100
/
vt100.doc
< prev
next >
Wrap
Text File
|
1995-03-18
|
25KB
|
706 lines
This is the documentation file for the VT100 terminal emulator originally
by Dave Wecker. Versions 2.7-2.8 are by Tony Sumrall. I can be reached
on USENET => acs@amdahl.com
Dave can be reached via:
Dave Wecker at ENET: COOKIE::WECKER
ARPA: wecker%cookie.dec.com@decwrl.dec.com
USENET: {decvax|decwrl}!cookie.dec.com!wecker
SNAIL: Dave Wecker
115 Palm Springs Drive
Colorado Springs, CO 80908
Note that Dave had NOTHING to do with this release. Don't bother him with
problem in my code.
MANY pieces of code/suggestions have been sent in..
thanks to all!
In particular, I'd like to thank Kim DeVaughn (kim@amdahl.com) for his
help in testing this release. We went through a lot together.
Program startup:
----------------
1> vt100 [-i | +i initfile] [ scriptfile ... ]
- -i option means don't look for an init file; +i means
look for an init file of this name. The search for the
init file will be the current directory then S:. Of
course you can always override this by saying C:file if
you like. The format for the init file is described
later in this document.
- The init file controls the setting of initial defaults
and screen and macro definitions.
- If none of the files (listed above) are found, the
built-in defaults (defined in VT100.C as variables,
beginning with "p_") are used.
- All commands are either menu or script based. Scripts
are described below.
Menus (Commands in parenthesis are default keyboard bindings: Right-Amiga-chr):
-----------------------------------------------------------------------
File - file transfers
Protocol - Sets the protocol to be used for send/rec.
ASCII - use uncontrolled protocol
Xmodem (A-X) - use the ever-popular Xmodem Checksum
XmodemCRC - use the in demand Xmodem CRC
Kermit (A-K) - my favorite protocol
Send (A-^) - Send a file using the selected protocol
Receive (A-V) - Receive a file as above
Kermit Get (A-G) - Get files from a kermit server
Kermit Bye (A-B) - Finish with the kermit server.
Capture - Log received text to a file. Changes to
Capturing when in progress
Comm Setup - Setup communications
Baud Rate - Set the terminal baud rate
300
1200 (A-L)
2400 (A-H)
4800
9600
Parity - Type of parity
NONE (A-X)
MARK
SPACE
EVEN (A-E)
ODD (A-O)
Xfer Mode
Image (A-I) - Send files verbatim (for UNIX hosts or
binary files)
Text (A-T) - Send CR LF as line terminator and strip
CR on received files (VMS text).
Convert - Should KERMIT convert fnames to lower case
Script - Script commands
Execute Macro (A-M) - Start up an asynchronous script file
Abort Execution (A-A) - Terminate a script file
Utility - Utility commands
Send Break (A-.) - send a break to the host
Hang Up - close line (not implemented yet)
Change Dir (A-D) - change the local directory (for transfers)
Clear Scrn - clear the screen (initial state)
Echo - turn on/off half duplex mode
Wrap (A-W) - turn on/off long line wrapping mode
Num Key (A-K) - turn on/off numeric keypad mode
App Cur (A-C) - turn on/off application cursor mode
BS<->DEL - swap backspace and delete keys
Keypad mapping (in application keypad mode):
--------------------------------------------
AMIGA VT100 comments
------- ------- ---------------------------
0-9 == 0-9
. == .
ENTER == ENTER (basically, flip the bottom
- == , 2 keys up to get a VT100)
HELP == - (only free key around)
f1-f4 == PF1-PF4 (or any rebinding you do)
arrows == arrows
Note: Right AMIGA key in conjunction with a period (".")
will send a break to the host.
CTRL in conjunction with an at-sign ("@") a two ("2") or a
space (" ") will send a NULL to the host.
CTRL in conjunction with a six ("6") will send a CTRL-^
CTRL in conjunction with a dash ("-") or question mark ("?")
will send a CTRL-_ to the host.
Multi file Xfers:
-----------------
The VT100 emulator supports multiple file transfers. This is
specified by using a comma (",") between file names when using XMODEM
or KERMIT. (NOTE: host XMODEM's normally CANNOT support multiple file
transfers).
When specifying a file name to recieve by default the directory path
is stripped off of the filename when sent to the host but is kept for the
local file spec. eg:
receive file: ram:file.txt,df1:newfile.bin,$
will ask the server for file.txt and put it in ram:, and get
newfile.bin and put it on df1: (see explanation of "$" below). If you
do a single file transfer you will get another prompt for the remote
name e.g.:
receive file: ram:file.txt
remote file name [file.txt]: userdisk1:wantfile.txt
The same rules apply to sending multiple files therefore if you are
doing multi file transfers make sure the host server is connected to
the desired directory.
In addition KERMIT supports wildcards:
* = any number of characters
? = any single character
Examples:
send: *.c,*.h,*.doc
get: *.c,*.h,$
Note that in this release, wilcarded files may be sent to a KERMIT that is
*not* in server mode (e.g. you can say "RECEIVE" to the host KERMIT and
send *.c files successfully).
KERMIT receive is now smart enough to use the host filename so no
filename needs to be specified on the AMIGA's side (see the CONVERT option).
If your host is capable of sending or receiving long packets (packets in
excess of 94 bytes) you may set p_kmaxpack to some number <= 1000. The script
command KMAXPACK can accomplish the same result.
Initialization and Script file operation:
-----------------------------------------
An initialization file (as described in the "Program Startup" section)
may contain any of the commands shown below that have the word INIT in
their description below. Commands that are available from scripts have
the word SCRIPT in the descriptions below. All commands may be abbreviated
to 3 letters and are case insensitive.
The script file can be invoked by selecting 'execute file' from the
script menu. At any time you can abort the script file by selecting
'Abort Execution'. You may also invoke a script from a function key if
the first character of the function key definition is the KEYSCRIPT
character (e.g., define F5 as "~df1:foo.script").
During the time script file is running the terminal emulation is still
active and you may type simulataneous to the script file. This may be
desired if your script file is WAITing for a string or is DELAYing for
a period of time etc.
Initialization and Script file Commands:
----------------------------------------
# Commented line (INIT,SCRIPT)
Format:
# This line is a comment
------------------------------------------------------------
APPCUR Set the application cursor mode (INIT,SCRIPT)
Format:
APPCUR ON/OFF or YES/NO
------------------------------------------------------------
ASCII_SEND Send an ascii file to the host. (SCRIPT)
Format:
(same format as CAPTURE)
------------------------------------------------------------
BACKGROUND Define a background color (INIT)
Format:
BACKGROUND hex three digit hex number
Example:
BACKGROUND F00 bright red background
------------------------------------------------------------
BAUD Set baud rate (INIT,SCRIPT)
Format:
BAUD rate Sets the baud rate for send/receive
Example:
BAUD 2400 Sets the baud rate at 2400 baud
------------------------------------------------------------
BEEP Beep at the console (SCRIPT)
Format:
BEEP
------------------------------------------------------------
BOLD Define a color for bold (INIT)
Format:
(same as BACKGROUND)
------------------------------------------------------------
BREAK Set the break time (for an SB command) (INIT,SCRIPT)
Format:
BREAK value Value is in micro-seconds
Example:
BREAK 750000
------------------------------------------------------------
BUFFER Set transmission buffer size (INIT)
Format:
BUFFER n Number of bytes to buffer
Example:
BUFFER 512
------------------------------------------------------------
CAPTURE To start/stop ascii file capture. (SCRIPT)
Format:
CAPTURE file Start ascii capturing
CAPTURE End ascii capturing
------------------------------------------------------------
CD To change the local directory (SCRIPT)
Format:
CD newdir set a new directory for file transfers
Example:
CD DF1:foo/bar set the directory as specified
------------------------------------------------------------
CONVERT Tell KERMIT whether or not to convert filenames (INIT,SCRIPT)
Format:
CONVERT ON/OFF or YES/NO
Example:
CONVERT ON Filenames will be down cased
------------------------------------------------------------
CURSOR Define a color for the cursor (INIT)
Format:
(same as BACKGROUND)
------------------------------------------------------------
DELAY Suspends script file for a specified time (SCRIPT)
Format:
DELAY n Suspends execution for n seconds
Example:
DELAY 2 Suspends for 2 seconds
------------------------------------------------------------
DEPTH Define the depth of the window/screen (INIT)
Format:
DEPTH n Number of planes in window/screen
Example:
DEPTH 1 Minimum depth
DEPTH 2 Same as Workbench
------------------------------------------------------------
ECHO Turn on/off local echo (INIT,SCRIPT)
Format:
ECHO ON/OFF or YES/NO
Example:
ECHO ON Half duplex mode
------------------------------------------------------------
EXIT Ends execution of the current script file. (INIT,SCRIPT)
Format:
EXIT Exit the current script/init file
EXIT VT100 Exit vt100 program (from SCRIPT only)
EXIT newscript Exit this file and start up newscript
Example:
EXIT DF1:FOO.BAR Exit the current file and start FOO.BAR
------------------------------------------------------------
F Define a function key (INIT,SCRIPT)
Format:
F n string Define Function key n to be string
Example: (see SEND for string format)
F 1 "dir^M" Define F1 is the string dir<cr>
F 11 "help" Define Shifted F1 as the string help
F 20 ^C Define Shifted F10 as a control-C
------------------------------------------------------------
FONT Specify font to use (INIT)
Format:
FONT 8-point-font-name
Example:
FONT whippy-8-point-font
------------------------------------------------------------
FOREGROUND Define a color for the foreground (INIT)
Format:
(same as BACKGROUND)
------------------------------------------------------------
GOTO Jumps to a different part of the script file. (SCRIPT)
Format:
GOTO label Jumps to a line beginning with label:
Jumps may be forward or backward.
Example:
FOO: Sets up a label
...
GOTO FOO Jumps to FOO
------------------------------------------------------------
INTERLACE Turn on/off interlace (INIT)
Format:
INTERLACE ON/OFF or YES/NO
Example:
INTERLACE ON Use interlacing
------------------------------------------------------------
KB Send a BYE packet to a host KERMIT server. (SCRIPT)
Format:
KB Shut down server.
------------------------------------------------------------
KEYSCRIPT Define a new keyscript character (INIT,SCRIPT)
Format:
KEYSCRIPT hex New character in hex
Example:
KEYSCRIPT 7E Use "~" as the new character
------------------------------------------------------------
KG Gets files from host. (SCRIPT)
Format:
(same format as KS) Get from server
------------------------------------------------------------
KMAXPACK Set maximum packet size for kermit transfers (INIT,SCRIPT)
Format:
KMAXPACK n Set maximum packet size to n
Example:
KMAXPACK 1000 Use long packets if possible. Don't forget
to increase the send/receive timeout values
on your host!!!
------------------------------------------------------------
KR Receives a file from kermit host. (SCRIPT)
Format:
(same format as KS) Not from a server
------------------------------------------------------------
KS Sends files via kermit to the host. (SCRIPT)
Format:
KS file Send one file
KS file1,file2,... Send multiple files
KS file1,file2,...,$ Send multiple files and shut down server
Example:
KS foo.bar sends foo.bar (note no quoting is used)
KS foo1,foo2,foo3 sends three files
KS foo1,foo2,foo3,$ sends three files and shuts down server
------------------------------------------------------------
LINES Define number of lines in the window (INIT)
Format:
LINES n
Example:
LINES 24 Maximum for non-interlace
LINES 48 Maximum for interlaced
LINES 0 Determine the maximum number of lines
available and use it
------------------------------------------------------------
MODE Set a transfer mode for KERMIT to use (INIT,SCRIPT)
Format:
MODE type type of transfers to perform
Example:
MODE IMAGE image mode transfers
MODE CRLF <CR><LF> text transfers (VMS Kermit).
------------------------------------------------------------
NUMKEY Numeric keypad mode (INIT,SCRIPT)
Format:
NUMKEY ON/OFF or YES/NO
Example:
NUMKEY ON Keypad is pure numbers
------------------------------------------------------------
ON Peforms a command every time string is received (SCRIPT)
Format:
ON "string" cmd Execute cmd when string is received.
Only one ON string may be installed at a
time.
If cmd is a GOTO and we were previously
WAITing for a string the WAIT is aborted and
execution resumes at the new label.
If cmd is not SEND and we were previously
DELAYing, then the DELAY is aborted and the
cmd is executed, followed by the next command
after the DELAY.
If cmd is a SEND and we were previously
DELAYing, then the DELAY is continued.
Example:
ON "LOSS CARRIER" GOTO RESTART
If modem drops carrier, try to redial
ON "--more--" SEND " "
Send a space every time --more-- is received
------------------------------------------------------------
PARITY Sets the parity (INIT,SCRIPT)
Format:
PARITY type Set the parity type
Example:
PARITY NONE no parity
PARITY MARK mark parity
PARITY SPACE space parity
PARITY ODD odd parity
PARITY EVEN even parity
------------------------------------------------------------
RECF Receive a file using the protocol specified in XPROTO (SCRIPT)
Format:
RECF file-spec
Example:
XPROTO XMODEMCRC Select XMODEM CRC protocol
RECF Foo Receive Foo using XMODEM CRC
------------------------------------------------------------
SB Sends a break character to the host (SCRIPT)
Format: Note that any pending character to send
SB is aborted by this call
------------------------------------------------------------
SCREEN Define the screen type (INIT)
Format:
SCREEN type type of screen to use
Example:
SCREEN WORKBENCH use the workbench screen
SCREEN CUSTOM use a custom screen
------------------------------------------------------------
SEND Sends a string or character to the host. (SCRIPT)
Format:
SEND "string" Sends a string to the host. Beginning and
ending double quotes (") are required. A
carat (^) may be used to send control chars.
Two carats transmits a carat character.
SEND chr Sends a single character.
SEND ^chr Sends a single control character. The chr
is NOT case sensitve
Example:
SEND "mail" Send the string mail
SEND "dir^M" Send the string dir followed by a <CR>
SEND a Send the letter a
SEND ^C Send a control C
SEND "abc^^def" Send the string abc^def
SEND ^^ Send a control-uparrow
SEND " Send the '"' character
------------------------------------------------------------
SENDF Send a file using the protocol specified in XPROTO (SCRIPT)
Format:
SENDF file-spec
Example:
XPROTO XMODEMCRC Select XMODEM CRC protocol
SENDF Foo Send Foo using XMODEM CRC
------------------------------------------------------------
SHORTCUT set a new shortcut command key (INIT)
Format:
SHORTCUT cmd key Sets key "key" to be the shortcut key for
script command "cmd". A null key will
cause no shortcut to be available for this
command (menu-option). Cmd may be one of
the following:
>> File items: <<
SE - Send file using XPROTO RE - Receive file using XPROTO
KG - kermit get file KB - kermit bye (for server)
CAP - ascii capture on/off
>> Mode (XPROTO) items: <<
ASC - ASCII "protocol" XM - XMODEM protocol
XMC - XMODEM CRC protocol KE - Kermit protocol
>> Comm items: <<
300 - Set Baud 300 1200 - Set Baud 1200
2400 - Set Baud 2400 4800 - Set Baud 4800
9600 - Set Baud 9600 NONE - Set Parity none
MARK - Set Parity mark SPACE - Set Parity space
EVEN - Set Parity even ODD - Set Parity odd
IMAGE - KERMIT transfer mode TEXT - KERMIT transfer mode
CONVERT - KERMIT transfer mode
>> Script items: <<
EXECUTE - execute macro ABORT - abort macro
>> Util items: <<
SB - send break HANG - hang up
CD - change directory CLEAR - clear screen
ECH - turn echo on or off WRAP - turn wrap on or off
NUMKEY - turn numeric kpad on/off APP - turn app. cursor on/off
CON - convert bs to del SWAP - Swap BS and DEL
Example:
SHORTCUT ASC Q set Right-Amiga-Q to be the shortcut for
ASCII_SEND.
SHORTCUT XS removes the shortcut key for sending via
XMODEM protocol
------------------------------------------------------------
SWAP Swap the meanings of backspace and delete keys (INIT,SCRIPT)
Format:
SWAP ON/OFF or YES/NO
Example:
SWAP NO Use standard definitions
------------------------------------------------------------
UNIT Set unit of serial device to use (INIT)
Format:
UNIT n
Example:
UNIT 1 Open unit 1 of serial.device. Generally the user
will want to specify unit 0. When multi-port serial
cards become available specify as necessary.
------------------------------------------------------------
VOLUME Set the BELL volume (INIT)
Format:
VOLUME n
Example:
VOLUME 0 Use a visual bell
VOLUME 64 Use a loud audible bell
------------------------------------------------------------
WAIT Suspends until a certain string is received. (SCRIPT)
Format:
WAIT "string" Same rules for string as SEND
WAIT Enter an endless wait. Usually used after
some "ON" commands have been set up. Can
still be aborted via the script menu.
Example:
WAIT "User:" Waits for the string User:
------------------------------------------------------------
WBCOLORS Force usage of workbench colors (INIT)
Format:
WBCOLORS ON/OFF or YES/NO
Example:
WBCOLORS YES Workbebch colors will be used for all
------------------------------------------------------------
WRAP Set long line wrapping (INIT,SCRIPT)
Format:
WRAP ON/OFF or YES/NO
Example:
WRAP ON Long lines will wrap
------------------------------------------------------------
XBEEP Beep at end of xfer (INIT,SCRIPT)
Format:
XBEEP ON/OFF or YES/NO
Example:
XBEEP ON Beep when xfers are finished
------------------------------------------------------------
XPROTO Set default transfer protocol (INIT,SCRIPT)
Format:
XPROTO XMODEM or XMODEMCRC or KERMIT
Example:
XPROTO KERMIT Sets transfer protocol to Kermit
------------------------------------------------------------
XR Receives a file via XMODEM. (SCRIPT)
Format:
(same format as KS)
------------------------------------------------------------
XS Sends a file via XMODEM. (SCRIPT)
Format:
(same format as KS)
------------------------------------------------------------
----------------------------
Initialization file example:
----------------------------
#####################################################################
#
# VT100 sample initialization file
# v2.8 880117 ACS
#
# Hash mark at the beginning of a line denotes a comment.
# White space (space(s) or tab(s)) delimit fields.
# Case ignored except for function key bindings.
#
# All items in this file overide variables of the same name in VT100.C
# (all variables in vt100.c have a "p_" prepended to them)
#
#####################################################################
#
APPCUR ON # Application keypad mode is being used
BACKGROUND 000 # Colors are in hex RGB from 000 to FFF
BAUD 2400 # Anything after required fields is ignored
BOLD a00 # Color for bold highlighting (in custom)
BREAK 750000 # Break time in micro-seconds
BUFFER 512 # 512 <= Input buffer size <= 2048
CONVERT ON # KERMIT should downcase host names
CURSOR 00a # Color for cursor (in custom screen)
DEPTH 1 # number of bit planes to use (1 or 2)
ECHO OFF # Full duplex mode in use
FONT MyFont # Use my own special 8-point font
FOREGROUND 950 # Colors are only used on the custom screen
INTERLACE ON # ON for CUSTOM or interlaced workbench
KEYSCRIPT 7E # Hex value for script introducer
LINES 0 # normal <= 24 interlaced <= 48 or 0
MODE CRLF # IMAGE or CRLF (for KERMIT transfers)
NUMKEY ON # The keypad should be numeric
PARITY NONE # NONE (= 8 bit), MARK, SPACE, ODD or EVEN
SCREEN CUSTOM # may be CUSTOM or WORKBENCH
SWAP OFF # Don't Swap the Back-space and Delete keys
VOLUME 64 # Beep Volume (0 = Visual Beep)
WBCOLORS YES # ignore custom colors and use defaults
WRAP OFF # Auto wrap ON or OFF
XBEEP ON # Beep when xfer is done
XPROTO XMODEMCRC # Send/Receive will use Xmodem CRC.
# Remove the shortcut key for the CD command. No comment on next line
# as it will be taken as the shortcut key.
SHORTCUT CD
#
# Function bindings (strings to type when any of F1 - F10 are pressed)
# f <num> = function key
# f <num>+10 = shifted function key
#
# The string specified must be the same format as the SEND command:
# ^ = control next character
# ^^ = up arrow
#
# Sample control characters:
# ^[ = escape ^M = carriage return
# ^J = line feed ^L = form feed
#
# If the first character of the string is a script introducer
# (KEYSCRIPT) then the string is interpreted as a script filename
# to be executed when the key is pressed.
#
# Examples of bindings:
#
f 1 "^[OP" # f1-f4 = PF1 - PF4 on a VT100
f 2 "^[OQ"
f 3 "^[OR"
f 4 "^[OS"
#
# f5,6,7 = scripts to execute (assuming that KEYSCRIPT = '~' = 0x7E)
#
f 5 "~df1:vt100_source/dialwork.script"
f 6 "~df1:vt100_source/sendvt100.script"
f 7 "~df1:vt100_source/getpics.script"
#
f 8 "MAIL^M" # Reads my mail (note embedded <CR>)
f 9 "NOTE^M" # Reads conferences
f 11 "ATdt415-595-2479^M" # dials the FAUG BBS
#
# all done with init, now execute script as startup sequence
#
exit df1:vt100_source/dialwork.script
--------------------
Script file example:
--------------------
###################################################################
# Script to dial work (dialwork.script)
# v2.6 870222 DBW
###################################################################
#
# Make sure that we have all the parameters we want
#
DELAY 2
BAUD 2400
PARITY NONE
MODE CRLF
BREAK 750000
SB
#
# First get the modem's attention:
#
Start:
DELAY 1
ON "Ready" GOTO Dial
SEND ^B
DELAY 2
GOTO Start
#
# Now dial the 2400 baud line to work:
#
Dial:
ON "Attached" GOTO Login
SEND "$2400!"
DELAY 30
GOTO Start
#
# We got attached, so keep hitting return until the Gandalf terminal
# handler wakes up:
#
Login:
ON "enter" GOTO Gandalf
DELAY 1
SEND ^M
GOTO Login
#
# Now connect from the Gandalf to the terminal server (ts2):
# (when it asks for a password I need to type the password
# manually here)
#
Gandalf:
DELAY 2
SEND "ts2^M"
WAIT "class start"
#
# Keep sending <CR>'s until the LAT prompts for a username:
#
WaitLat:
DELAY 2
ON "username>" GOTO Lat
SEND ^M
GOTO WaitLat
#
# Tell the LAT that it's me, and connect to the "cookie cluster"
# (my host systems). Tell the cluster my user name.
# (when it asks for a password I need to type the password
# manually here)
#
Lat:
SEND "wecker^M"
DELAY 1
SEND "connect cookie^M"
WAIT "Username:"
SEND "WECKER^M"
WAIT "at home"
SEND "^M^Mn^M"
#
# Got through all the LOGIN garbage, so let's do some work.
#
WAIT "$ "
#
# All done so stop:
#
EXIT